package com.stlm2.dems.entity.base;

import com.stlm2.dems.entity.BannerType;

/**
 * Created by apple on 2017/6/13.
 */
public class BaseBanner  {
    private Integer id;
    private String img;//图片路径
    private BannerType type;//类型
    private Integer sort;//优先级
    private String memo;//备注
    private Boolean state;//是否有效
    private String url;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public BannerType getType() {
        return type;
    }

    public void setType(BannerType type) {
        this.type = type;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public Boolean getState() {
        return state;
    }

    public void setState(Boolean state) {
        this.state = state;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }



    /**
     * 映射 轮播图类型
     */
    public Integer getTypeValue() {
        return (type != null) ? type.getIntValue() : null;
    }

    public void setTypeValue(Integer value) {
        if (value != null)
            this.type = BannerType.getByIntValue(value);
    }


}
